package myJs.user.workflow.featureSelection.uniAna

import myJs.Implicits._
import myJs.cps._
import myJs.user.workflow.featureSelection.preprocess.AllCp.PreprocessT
import myJs.myPkg.jquery._
import myJs.tool.Tool
import myJs.tool.Tool._
import org.scalajs.dom.html.Input
import shared.Pojo.{ExtraNormalSoftT, RemoveQcT}
import shared.SharedTool
import com.softwaremill.quicklens._
import myJs.user.FeatureSelectionTool

import scala.collection.SeqMap

import japgolly.scalajs.react.vdom.all._
import japgolly.scalajs.react._
import japgolly.scalajs.react.React.Fragment
import japgolly.scalajs.react.util.EffectCatsEffect._
import myJs.myPkg.Hooks._
import cats.effect._
import myJs.Implicits._
import myJs.Utils._

/**
 * Created by yz on 3/11/2020
 */
object MyToolCp {

  case class Props(
                    removeModule: SyncIO[Unit],
                    disabled: Boolean
                  ){
    @inline def render: VdomElement = {
      Component(this)
    }
  }

  val Component = ScalaFnComponent[Props] { props =>

    object FTool {

    }

    useEffect(SyncIO{
      Tool.popover
    }.void, List()
    )

    div(className := "myTool", float.right, marginTop := "-20px", paddingRight := "0px",
      button(cursor.pointer, paddingRight := "0px",
        paddingLeft := "0px", paddingBottom := "0px", paddingTop := "0px", color := "#595959", fontSize := "12px",
        disabled := props.disabled,
        title := messages("RemovalConditions"), className := "btn btn-link",
        i(className := "fa fa-remove"), onClick --> props.removeModule
      )
    )
  }

}



